package com.lihao.sam.controller;

import com.lihao.sam.entity.HealthCheck;
import com.lihao.sam.entity.ScoreSet;
import com.lihao.sam.service.intf.HealthCheckService;
import com.lihao.sam.service.intf.HealthStatisticsService;
import com.lihao.sam.vo.PageVo;
import com.lihao.sam.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 赵申奥
 * @Description:卫生检查表
 */
@RestController
@RequestMapping("/api/check/")
public class HealthCheckController {
    @Resource
    private HealthCheckService service;

    @PostMapping("add.do")
    public R add(HealthCheck healthCheck){
        return service.add(healthCheck);
    }
    @PostMapping("update.do")
    public R update(HealthCheck healthCheck){
        return service.update(healthCheck);
    }
    @PostMapping("del.do")
    public R del(int id){
        return service.delete(id);
    }
    @GetMapping("page.do")
    public PageVo page(String address, String buildNo, String floorNo, int page, int limit){
        return service.queryPage(address,buildNo,floorNo,page, limit);
    }
    @GetMapping("selectcount.do")
    public R collegeMajorCount(){
        return service.queryCount();
    }


}
